package org.alex.jdk8.collection;

import java.util.Arrays;
import java.util.List;

public class ListOne {
public static void main(String[] args) {
	List<String> list=Arrays.asList("root","admin","super","guest","who","ps","none","null");
	boolean any=list.stream().anyMatch(a -> a.startsWith("a"));//true
	boolean all=list.stream().allMatch((b) -> {return (b.indexOf("r")!=-1);});//false
	list.stream().filter(a -> (a.indexOf("s")!=-1)).forEach((System.err::println));
	System.out.println(any);
	System.out.println(all);
}
}
